package com.dcy.znoa.domain.estate;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <p>
 * 物业出门条
 * </p>
 *
 * @author cook
 * @since 2018-05-21
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("estate_outnote")
public class EstateOutnote extends Model<EstateOutnote> {

    private static final long serialVersionUID = 1L;

    public static String NOT_VALID_QR_CODE ="FFFFFF";//出门条完成后，统一设置成无效的二维码
    /**
     * 物业出门条ID
     */
	@TableId(value="eson_id", type= IdType.AUTO)
	private Long esonId;
    /**
     * 物业ID
     */
	@TableField("es_id")
	private Long esId;
    /**
     * 公司ID
     */
	@TableField("comp_id")
	private Long compId;
    /**
     * 发起人ID
     */
	@TableField("send_oper_id")
	private Long sendOperId;
    /**
     * 审批人ID
     */
	@TableField("audit_oper_id")
	private Long auditOperId;
	/**
	 * 审批时间 20180616 add
	 */
	@TableField("audit_time")
	private Date auditTime;
    /**
     * 处理人ID：出门时的处理人
     */
	@TableField("handle_oper_id")
	private Long handleOperId;
	/**
	 * 出门时间 20180616 add
	 */
	@TableField("out_time")
	private Date outTime;
    /**
     * 备注
     */
	@TableField
	private String remark;
    /**
     * 携带物品
     */
	@TableField
	private String goods;
    /**
     * 订单状态
            1 待审批
            2 已通过
            3 已完成
            4 被拒绝
            5 已撤销
     */
	@TableField
	private Integer status;
    /**
     * 二维码编号
     */
	@TableField("qr_code")
	private String qrCode;
	/**
	 * 拒绝备注
	 */
	@TableField("refuseRemark")
	private String refuseRemark;
    /**
     * 记录时间
     */
	@TableField("create_time")
	private Date createTime;
    /**
     * 创建人id
     */
	@TableField("create_oper_id")
	private Long createOperId;
    /**
     * 更新时间
     */
	@TableField("update_time")
	private Date updateTime;
    /**
     * 创建人id
     */
	@TableField("update_oper_id")
	private Long updateOperId;
    /**
     * 有效标记
     */
	@TableField("valid_flag")
	private Integer validFlag;


	@TableField(exist = false)
	String operName;

	@TableField(exist = false)
	String phoneNo;

	@TableField(exist = false)
	String compName;

	@TableField(exist = false)
	String depName;

	//附件 来自 AddStoreFileModel
	@TableField(exist = false)
	private String fileName;
	@TableField(exist = false)
	private String remoteFileName;//以逗号分隔
	@TableField(exist = false)
	private String downloadPath;

	@Override
	protected Serializable pkVal() {
		return this.esonId;
	}

}
